<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "{{%wechat_app}}".
 *
 * @property integer $id
 * @property integer $wechat_app_id
 * @property string $org_name
 *  @property string $app_name
 * @property string $client_id
 * @property string $client_secret
 * @property datetime $createtime
 * @property integer $is_delete
 */
class LiveSetting extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%live_setting}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['wechat_app_id',  'is_delete'], 'integer'],
            [['wechat_app_id','app_key','org_name','app_name', 'client_id', 'client_secret'], 'required'],
//            [['cert_pem', 'key_pem'], 'string'],
            [['org_name','app_name', 'client_id', 'client_secret','app_key'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'wechat_app_id' => '小程序id',
//            'user_id' => 'User ID',
            'org_name' => 'org_name',
            'app_name' => 'app_name',
            'client_id' => 'client_id',
            'client_secret' => 'client_secret',
            'app_key'=>'app_key',
//            'desc' => 'Desc',
            'createtime' => 'createtime',
            'is_delete' => 'Is Delete',
            'access_token'=>'access_token',
        ];
    }
}
